<!DOCTYPE html>
<html lang="en">

	<head>
		<meta charset="utf-8">
		<meta name="viewport" content="width=device-width, initial-scale=1, minimum-scale=0.5, maximum-scale=2.0, user-scalable=yes">
		<title>大唐微科集团</title>
		<link rel="shortcut icon" href="assets/img/icon.png">
		<link rel="stylesheet" type="text/css" href="assets/css/bootstrap.min.css">
		<link rel="stylesheet" type="text/css" href="assets/css/main.css">
		<link rel="stylesheet" type="text/css" href="assets/css/green.css" media="screen" />
		<link rel="stylesheet" type="text/css" href="assets/css/animate.css">
		<link rel="stylesheet" href="assets/css/slicknav.css" />
		<link rel="stylesheet" href="assets/css/Element-ui.css" />
		<style type="text/css">
			#app{
				margin:auto;
				width:90%;
				margin-left:5%;
				float: left;
			}
			.el-carousel__container img{
				display: block;
				width:100%;
			}
			#carousel-area i{
				margin-right: 0;
			}
			@media only screen and (min-width: 320px) and (max-width: 480px) {
				.el-pagination.is-background .el-pager li {
				    margin: 0 2px;
				}
				.el-carousel__indicator {
				    padding: 4px 7px;
				}
				.el-carousel__button{
					width:7px;
					height:7px;
				}
			}
		</style>
	</head>

	<body>
		<header id="header-wrap"></header>
		<div id="app" v-cloak>
			<!--<div class="banner_img">
				<img src="assets/img/banner_bg.png"/>
			</div>-->
			<!--center-->
			<section id="about" class="section">
				<div class="team-all about_team">
					<div class="about_border_bottom"> 
						<div class="introduction_left" ref='bannerHeight'>
							<div class="" id="company_nav_tit">
								<div class="section-title wow fadeInUpQuick">
									<a href="index.html" class="a_hover">
										<img src="assets/img/home.png" />&nbsp;&nbsp;首页&nbsp;
									</a><i class="el-icon-arrow-right"></i>&nbsp;<a class="a_hover" href="news.html">新闻媒体</a>
									<i class="el-icon-arrow-right"></i>&nbsp;<span style="color:#003793;">{{className}}</span>
								</div>
							</div>
							<!--集团要闻-->
							<div class="news_list_div" v-for="(item,index) in newsList" v-if="index == 0" @click="btn_detail(item.newsId)">
								<p class="news_list_op">{{item.newsTitle}}</p>
								<p class="news_list_centent">{{item.profile}}</p>
							</div>
							<dl class="news_list_dl" v-for="items in newsList" @click="btn_detail(items.newsId)">
								<dt class="news_list_dt">{{items.releaseTime}}</dt>
								<dd class="news_list_dd">{{items.newsTitle}}</dd>
							</dl>
							<div class="news_list_btn" @click="btnPage" v-if="page < page_count">
								<img src="assets/img/look1.png"/>
							</div>
							<div class="news_list_btn" v-else>没有更多</div>
						</div>
						<div class="introduction_right">
							<div class="introdu_topImg">
								<img src="assets/img/news.png"/>
								<div class="topImg_right">共创·共建·共赢·共享</div>
							</div>
							<ul class="right_ulList" :style="{height:UlHeight - 97 + 'px'}">
								<li class="li_List" v-for="(item,index) in newsRightInfo" :class="{List_active:index == current}" @click="btnRightList(index,item.id,item.classifiedsName)">{{item.classifiedsName}}</li>
							</ul>
						</div>
					</div>
					<!--底部边框颜色-->
					<div class="bottom_color">
						<div class="left_color"></div>
						<div class="right_color"></div>
					</div>
				</div>
			</section>
		</div>
		<script type="text/javascript" src="assets/js/jquery-min.js"></script>
		<script type="text/javascript" src="assets/js/conent.js"></script>
		<script type="text/javascript" src="assets/js/vue.js" ></script>
		<script type="text/javascript" src="assets/js/vue-resource.js" ></script>
		<!--<script type="text/javascript" src="assets/js/Element-ui.js" ></script>-->
		<script type="text/javascript">
			function getQueryString(name) {
				var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)")
				var r = window.location.search.substr(1).match(reg);
				if(r != null) {
					return decodeURI(r[2])
				}
				return null;
			}
			//状态ID
			var NewId = getQueryString("newsId");
			//状态名称
			var newsListName = getQueryString("newsName")
			//状态下标
			var newsNumber = getQueryString("number")
			var vm = new Vue({
				el:'#app',
				data(){
					return{
						UlHeight : '',
						newsList : '',
						newsRightInfo : '',
						current : 0,
						className : '',
						page: 1,
            			page_count: '',
            			newsID : ''
					}
				},
				created(){
					this.newsInfo(newsNumber,NewId,newsListName);
					this.rightInfo()
				},
				methods:{
					newsInfo(index,id,Names){
						var _this = this;
						this.$http.get(URL + 'sysnews/' + id,{
							params:{
								page_num : 1 ,
								page_size : 9
							}
						}).then(function(obj){
							console.log(obj)
							if(obj.body.code == 'success'){
								if(obj.body.data.rows.length > 0){
									_this.newsList = obj.body.data.rows;
									//总页数
									_this.page_count = Math.ceil(obj.body.data.total/9);
									//id
									_this.newsID = id;
									//名称
									_this.className = Names;
									//下标
									_this.current = index;
									//获取高度
									setTimeout(function() {
										_this.$nextTick(function(){
											_this.UlHeight = this.$refs.bannerHeight.offsetHeight;
										})
									},300)
								}
							}
						})
					},
					//分页
					btnPage(){
						var pageContent = this.page += 1;
						var _this = this;
						this.$http.get(URL + 'sysnews/' + this.newsID,{
							params:{
								page_num : pageContent,
								page_size : 9
							}
						}).then(function(obj){
							if(obj.body.code == 'success'){
								if(obj.body.data.rows.length > 0){
									_this.newsList = _this.newsList.concat(obj.body.data.rows);
									setTimeout(function() {
										_this.$nextTick(function(){
											_this.UlHeight = this.$refs.bannerHeight.offsetHeight;
										})
									},300)
								}
							}
						})
					},
					//右侧列表
					rightInfo(){
						var _this = this;
						this.$http.get(URL + 'sysnewsclassifies').then(function(obj){
							if(obj.body.code == 'success'){
								_this.newsRightInfo = obj.body.data;
							}
						})
					},
					//右侧切换
					btnRightList(index,id,Names){
						this.page = 1;
						this.newsInfo(index,id,Names)
					},
					//详情页
					btn_detail(id){
						window.location.href = 'news_detail.html?newsdetailId=' + id + '&detaliNum=' + newsNumber + '&detailNumClass=' + newsListName
					}
				},
				mounted(){
					//新闻资讯滑过改变颜色
					$(document).ready(function(){
						var newImage = new Image(); //预载入图片
						var oldImage = $('.news_list_btn img').attr('src');
						newImage.src = './assets/img/look.png';
						$('.news_list_btn').hover(function(){ //鼠标滑过图片切换
							$('.news_list_btn img').attr('src',newImage.src);
							$(this).css({'background':'#003793','cursor':'pointer','color':'#fff'})
						},
						function(){
							$('.news_list_btn img').attr('src',oldImage);
							$(this).css({'background':'rgba(230,230,230,1)','color':'#666'})
						});
					});
				},
				updated(){
					setTimeout(function() {
						$("#main-menu li a").removeClass("active");
						$("#main-menu li:nth-of-type(" + 5 + ") a").addClass('active');
					},300)
				}
			})
			setTimeout(function() {
				var wow = new WOW({
					mobile: false 
				});
				wow.init();
			},300)
			
		</script>
		<script type="text/javascript" src="assets/js/wow.js" ></script>
		<!--底部-->
		<footer id="footer"></footer>
		<a href="#" class="back-to-top">
			<i class="fa fa-angle-up">
				<span class="i_span"></span>
			</i>
		</a>
		<script type="text/javascript" src="assets/js/Top.js"></script>
	</body>

</html>